package com.sinog.front.service.azbj.uploadappendix;

import com.sinog.front.feign.biz.FtpUtilService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

/**
 * @desc 异步上传文件到ftp
 * @author lzq
 * @date 2020-09-25 2:57 下午
 */
@Component
@Slf4j
@RefreshScope
public class AsyncUploadFileToFtp {

    @Resource
    private FtpUtilService ftpUtilService;

    /**
     * 描述
     * @param datapath datapath
     * @param filePath filePath
     */
    @Async
    public void uploadFileToFtp(String datapath,String filePath) {
        log.info(">>>>>>>>>>异步上传文件到ftp开始<<<<<<<<<<");
        ftpUtilService.uploadFileToFtp(datapath,filePath);
        log.info(">>>>>>>>>>异步上传文件到ftp结束<<<<<<<<<<");
    }
}